package com.longrou.base.activity.main

import android.databinding.DataBindingUtil
import android.os.Bundle
import android.os.Handler
import android.support.v4.content.ContextCompat
import com.longrou.base.R
import com.longrou.base.base.BaseActivity
import com.longrou.base.config.SystemConfig
import com.longrou.base.databinding.ActivityLaunchBinding

/**
 * @Description:
 * @Author: LongRou
 * @CreateDate: 2018-05-17 23:17
 * @Version: 1.0
 **/
class LaunchActivity : BaseActivity() {
    var handler : Handler = Handler()
    var binding :ActivityLaunchBinding? = null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView<ActivityLaunchBinding>(this, R.layout.activity_launch)
        setColoringStatusBar(ContextCompat.getColor(applicationContext,R.color.white))
        init()
    }
    fun init(){
        handler.postDelayed({
            buildActivity("/Main/Main").navigation()
            finish()
        }, SystemConfig.LAUNCH_TIME)
    }
}